#pragma once

#include <QThread>
#include <winsock2.h> 
#include <cmath>
using namespace std;

enum
{
	TiltingUnkonw=0,
	TiltingStarting=1,
	TiltingRuning=2,
	TiltingFinish=3,
	TiltingOdle=4
};
enum
{
	RobotUnknow=0,
	RobotMoving=1,
	RobotStop=5
};

struct CommunicationData
{
	int x;
	int y;
	double theta;
	int RobotState;
	int TiltingState;
	bool CaptureFlag;
public:
	CommunicationData()
	{
		RobotState=RobotUnknow;
		TiltingState=TiltingUnkonw;
		CaptureFlag=false;
	}
};
extern double x;
extern double y;
extern double theta;
extern int RobotState;
extern int TiltingState;
extern bool ControlStartCapture;

class AxOdometryServer: public QThread
{
	Q_OBJECT
public:
	AxOdometryServer(void);
	~AxOdometryServer(void);
public:
	void run();
	bool stopped;
signals:
	void printInfo();
};

